let person: {} = {} //  基础 空对象

// 有属性的对象
let user: {
  name: string
  age: number
} = {
  name: 'zs',
  age: 19,
}

console.log(user)

// 有属性和方法，一行书写多个属性 ; 分隔

let userFn: {
  name: string
  sayHi(): void
  sing(): void
  // sing: () => void

  dancing(): string
} = {
  name: 'cxk',
  sayHi: function () {
    console.log('rap')
  },
  sing() {
    console.log('鸡你太美')
  },

  dancing() {
    return '背带 耸肩'
  },
}

const axios = (
  url: string,
  config?: {
    method?: string
  }
): void => {}

//  对象的type 别名写法  大量使用
type Config = {
  url: string
  config?: {
    method?: String
  }
}

const myAxois = (cofing: Config) => {}
